import request from '@/utils/request'

export default {
    // 医院列表
    getHospList(page, limit, searchObj) {
        return request({
            url: `/admin/hosp/hospital/list/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },
    // 根据dictCode查询所有子节点
    findByDictCode(dictCode) {
        return request({
            url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
            method: 'get',
        })
    },
    // 根据数据id查询子数据
    findChildById(id) {
        return request({
            url: `/admin/cmn/dict/findChildData/${id}`,
            method: 'get',
        })
    },
    // 更新医院上线状态
    updateStatus(id, status) {
        return request({
            url: `/admin/hosp/hospital/updateHospStatus/${id}/${status}`,
            method: 'get',
        })
    },
    // 根据id查询医院详情
    getHospById(id) {
        return request({
            url: `/admin/hosp/hospital/showHospDetail/${id}`,
            method: 'get',
        })
    },
    // 查看医院科室
    getDeptByHoscode(hoscode) {
        return request({
            url: `/admin/hosp/department/getDeptList/${hoscode}`,
            method: 'get',
        })
    },
    // 根据医院编号和科室编号查询排班
    getScheduleRule(page, limit, hoscode, depcode) {
        return request({
            url: `/admin/hosp/schedule/getScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
            method: 'get',
        })
    },
    // 获得排班详细信息
    getScheduleDetail(hoscode, depcode, workDate) {
        return request({
            url: `/admin/hosp/schedule/getScheduleDetail/${hoscode}/${depcode}/${workDate}`,
            method: 'get',
        })
    }
}